<div class="tpl-content-wrapper">
    <div class="row-content am-cf">
        <div class="row">
            <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                <div class="widget am-cf">
                    <div class="widget-head am-cf">
                        <div class="widget-title  am-cf">{$title}</div>
                    </div>
                    <form action="{:U('delete')}">
                    <div class="widget-body  am-fr">
                        <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                            <div class="am-form-group">
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <a href="{:U('Category/add')}"  class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</a>
                                        <button type="submit" class="am-btn am-btn-default am-btn-danger" onclick="return confirm('确定要删除选中的数据吗')"><span class="am-icon-trash-o"></span> 批量删除</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="am-u-sm-12">
                            <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black " >
                                <thead>
                                    <tr>
                                        <th>商品分类名称</th>
                                        <th style="text-align: center">排序</th>
                                        <th>注册时间</th>
                                        <th>修改时间</th>
                                        <th>操作</th>

                                    </tr>
                                </thead>
                                <tbody id="c_list">
                                    <volist name="data" id="vo">
                                        <tr class="gradeC">
                                            <td>
                                                <a href="javascript:void(0);"
                                                <eq name="vo.is_blank" value="1">target="_blank"</eq>>
                                                <font style="color:#dd514c"><for start="0" end="$vo.level">|--</for></font>{$vo.name}
                                                </a>
                                            </td>
                                            <td style="text-align: center">{$vo.sort}</td>
                                            <td>{$vo.c_time|date='Y年m月d日 H:i:s',###}</td>
                                            <td>{$vo.u_time|date='Y年m月d日 H:i:s',###}</td>
                                            <td>
                                                <div class="tpl-table-black-operation">
                                                    <a href="{:U('Category/edit',array('id'=>$vo['id']))}">
                                                        <i class="am-icon-pencil"></i> 编辑
                                                    </a>
                                                    <a href="{:U('Category/delete',array('id'=>$vo['id']))}" class="tpl-table-black-operation-del"
                                                       onclick="return confirm('确定要删除该数据吗')">
                                                        <i class="am-icon-trash"></i> 删除
                                                    </a>
                                                </div>
                                            </td>
                                        </tr>
                                    </volist>
                                </tbody>
                            </table>
                        </div>
                        <div class="am-u-lg-12 am-cf" >
                            <div class="am-fr" id="page">
                                {$page}
                            </div>
                        </div>
                    </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<!--页码-->
<script>
    $(document).ready(function(){
        $("#del_check_all").click(function(){
//            $(this).attr("c")
            $(".del_check").prop('checked',$(this).prop('checked'));
        });

        $(".del_check").click(function(){
            if(!$(this).prop("checked")){
                $("#del_check_all").prop("checked",false);
            }else{
                if($(".del_check:checked").length == $(".del_check").length){
                    $("#del_check_all").prop("checked",true);
                }
            }
        })
</script>